package com.controllers
{
	import com.GameModel;
	import com.datas.vo.ItemVO;
	import com.views.GameView;
	
	public class GameRandomLayerController
	{
		private var _view:GameView;
		private var gameModel:GameModel = GameModel.getInstance();
		public function GameRandomLayerController(p_view)
		{
			_view = p_view;
		}
		
		public function updatePlayLayerView(p_vo1:ItemVO,p_vo2:ItemVO):void{
			_view.playLayerView.updatePlayLayerView(p_vo1,p_vo2);
		}
		
		public function updateId():void{
			for each(var list:Array in gameModel.itemList){
				for each( var item:ItemVO in list){
					if(item.id == 2&&item.type!=0){
						item.id = 1
					}else if(item.id == 2&&item.type ==0){
						item.id = 0;
					}
				}
			}
			_view.playLayerView.stopCreateRandomView();
		}

	}
}